
public class MajAltitude extends Thread {
	private GererCadrans gerant;
	private boolean actif;

	public MajAltitude(GererCadrans g) {
		this.gerant = g;
		this.actif = true;
	}

	public void run() {
		while (this.actif) {
			gerant.setAltis(gerant.getAltitude() + gerant.getVitesseVerticale()/10*3.281);
			try{
				this.sleep(100);
			}
			catch(InterruptedException ie){
			}
		}
	}

	public void arreter() {
		actif = false;
	}
}
